
#include "gd32l23x.h"
#include "gd32l23x_eval.h"
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include <stdio.h>
#include "Caige.h"
#include "device.h"

//extern void Start_init2(void);

int main(void)
{
    Start_init();
    vTaskStartScheduler();
}

/* retarget the C library printf function to the USART */
int fputc(int ch, FILE* f)
{
#ifdef LOG_PRINT
    usart_data_transmit(EVAL_COM, (uint8_t) ch);

    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));

    return ch;
#else
    return ch;
#endif
}

int fputck(int ch, FILE* f)
{
    usart_data_transmit(COMMU_COM, (uint8_t) ch);

    while(RESET == usart_flag_get(COMMU_COM, USART_FLAG_TBE));

    return ch;
}

